<template>
	<view class="content">
		<van-radio-group :value="obj.radio" @change="onChange">
			<van-radio name="1">单选框 1</van-radio>
			<van-radio name="2">单选框 2</van-radio>
		</van-radio-group>
		<!-- <canvas id="myEcharts"></canvas> -->
		<view><l-echart ref="chart"></l-echart></view>
	</view>
</template>

<script>
	import LEchart from '@/uni_modules/lime-echart/components/l-echart/l-echart.vue';
	import * as echarts from '@/uni_modules/lime-echart/static/echarts.min'
	// import * as echarts from 'echarts'
	export default {
		data() {
			return {
				obj: {
					radio: "2"
				},
				option: {
					xAxis: {
						type: 'category',
						data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
					},
					yAxis: {
						type: 'value'
					},
					series: [{
						data: [820, 932, 901, 934, 1290, 1330, 1320],
						type: 'line',
						smooth: true
					}]
				},
			}
		},
		methods: {
			onChange(event) {
				console.log(this.obj.radio);
			}
		},
		mounted() {
			this.$refs.chart.init(echarts, chart => {
				chart.setOption(this.option);
			});
		},
		components: {
			LEchart
		}
	}
</script>

<style>
	#myEcharts {
		width: 100%;
		height: 600rpx;
	}

	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
</style>